/*
 *    Copyright (c) 2018-2025, lengleng All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the robot4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: lengleng (wangiegie@gmail.com)
 */

package com.hitqz.robot.biz.core;

import jakarta.annotation.PostConstruct;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Component;

/**
 * 文件 配置信息
 *
 * @author lengleng
 * <p>
 * bucket 设置公共读权限
 */
@Component
@ConfigurationProperties(prefix = "patrol")
@Primary
@Data
@Slf4j
public class PatrolProperties {
	/**
	 * 最大存储时间，单位：天
	 */
	private Integer maxHistory = 30 * 3; // 默认值为 3

	/**
	 * 最大存储大小，单位：GB
	 */
	private Integer maxSize = 500; // 默认值为 50

	@PostConstruct
	public void init() {
		log.info("巡检配置:最大存储大小 {} GB, 最大存储时间:{} 天",maxSize,maxHistory);
	}

}
